<?php

namespace backend\models;

use Yii;

/**
 * This is the model class for table "order".
 *
 * @property int $order_id 订单id
 * @property int|null $goods_id 商品id
 * @property int|null $order_price 商品总价
 * @property int|null $order_number 商品数量
 * @property string|null $goods_title 商品名称
 * @property int|null $order_add_time 订单添加时间
 * @property int|null $order_status 订单状态
 * @property int|null $order_play 支付方式
 * @property int|null $order_total 订单总金额
 */
class Order extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'order';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['goods_id', 'order_price', 'order_number', 'order_add_time', 'order_status', 'order_play', 'order_total'], 'integer'],
            [['goods_title'], 'string', 'max' => 50],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'order_id' => Yii::t('app', 'Order ID'),
            'goods_id' => Yii::t('app', 'Goods ID'),
            'order_price' => Yii::t('app', 'Order Price'),
            'order_number' => Yii::t('app', 'Order Number'),
            'goods_title' => Yii::t('app', 'Goods Title'),
            'order_add_time' => Yii::t('app', 'Order Add Time'),
            'order_status' => Yii::t('app', 'Order Status'),
            'order_play' => Yii::t('app', 'Order Play'),
            'order_total' => Yii::t('app', 'Order Total'),
        ];
    }
}
